<template>
  <transition name="el-fade-in-linear">
    <router-view />
  </transition>
</template>

<script>
import Cookies from "js-cookie";
import { messages } from "@/i18n";
export default {
  watch: {
    "$i18n.locale": "i18nHandle",
  },
  created() {
    this.i18nHandle(this.$i18n.locale);
  },
  methods: {
    i18nHandle(val, oldVal) {
      Cookies.set("language", val);
      document.querySelector("html").setAttribute("lang", val);
      document.title = messages[val].brand.lg;
      // 非登录页面，切换语言刷新页面
      if (this.$route.name !== "login" && oldVal) {
        window.location.reload();
      }
    },
  },
};
</script>

<style lang="scss">
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-corner {
  display: block;
}

::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background-color: rgba(0, 1, 0, 0.5);
}

::-webkit-scrollbar-thumb,
::-webkit-scrollbar-track {
  border-right-color: transparent;
  border-left-color: rgba(0, 1, 0, 0.5);
}
// .ql-container.ql-snow{height:420px!important}
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;

  &:hover {
    border-color: #409eff;
  }

  .avatar-uploader-icon {
    background-color: #fbfdff;
    border: 1px dashed #c0ccda;
    border-radius: 6px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    width: 148px;
    height: 148px;
    line-height: 146px !important;
    vertical-align: top;
  }

  .avatar {
    width: 148px;
    height: 148px;
    display: block;
  }
}
// p{margin: 0;}
.pdl60 {
  padding-left: 60px;
  span {
    color: #c0c4cc;
    margin-left: 3px;
  }
}
.pd0 {
  span {
    color: #c0c4cc;
    margin-left: 3px;
  }
}
//交通大屏样式样式重写

.jtScreen {
  .el-input__inner {
    border: 1px solid #097ed2;
    background-color: transparent;
    color: #c6d7f1 !important;
    border-image: radial-gradient(
        circle,
        rgba(9, 126, 210, 1),
        rgba(0, 95, 170, 1),
        rgba(0, 99, 255, 0)
      )
      10 50;
  }
  .el-select:hover .el-input__inner,
  .el-input__inner:hover {
    border: 1px solid #097ed2;
    background-color: transparent;
  }
  .el-button {
    width: 83px;
    height: 40px;
    background: linear-gradient(180deg, #103a80 0%, #133d83 100%);
    border-radius: 4px;
    opacity: 0.89;
    color: #fff;
    border: 0;
  }
  .el-select-dropdown {
    background: linear-gradient(180deg, #062156 0%, #0b3975 100%) !important;
    opacity: 0.9;
    .el-select-dropdown__item {
      color: #c6d7f1 !important;
    }
  }
  .el-select-dropdown__item.hover,
  .el-select-dropdown__item:hover {
    background-color: #23539b;
  }
  th {
    background: linear-gradient(180deg, #062156 0%, #0b3975 100%);
    opacity: 0.3;
    font-size: 12px;
    color: #c6d7f1 !important;
  }
  .el-table,
  .el-table th,
  .el-table tr {
    background-color: transparent;
    color: #c6d7f1;
    font-size: 12px;
  }
  .el-table td,
  .el-table th.is-leaf {
    border: none;
    opacity: 0.3;
  }
  .el-table--striped .el-table__body tr.el-table__row--striped td {
    background: linear-gradient(180deg, #062156 0%, #0b3975 100%) !important;
    opacity: 0.3;
    font-size: 12px;
    color: #c6d7f1 !important;
  }
  .el-table--enable-row-hover .el-table__body tr:hover > td {
    background: none;
  }
  .el-table::before {
    background-color: transparent;
  }
}
.el-select-dropdown {
  position: absolute;
  z-index: 99999 !important;
}
</style>
